<template>
  <div class="p-card">
    <i class="el-icon-close" @click="remove"></i>
    <p>{{name}}</p>
  </div>
</template>
<script>
export default {
  props: {
    data: null,
    index: 0
  },
  created() {

  },
  computed: {
    name() {
      return this.data && this.data.name ? this.data.name : '';
    }
  },
  data() {
    return {
    }
  },
  methods: {
    remove() {
      this.$emit('remove', this.data, this.index);
    }
  }
}
</script>
